<?php

namespace app\api\model\wanlshop;

use think\Model;
//use traits\model\SoftDelete;

class Hxq extends Model
{

//    use SoftDelete;


    // 表名
    protected $name = 'wanlshop_hxq';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';

    public function shop()
    {
        return $this->hasOne('Shop', 'id', 'shop_id');
    }

    public function hxquser()
    {
        return $this->hasMany('HxqUser', 'hxq_id', 'id');
    }

    public function goods()
    {
        return $this->hasOne('Goods', 'id', 'goods_id');
    }

    public function sku()
    {
        return $this->hasMany('GoodsSku', 'goods_id', 'goods_id');
    }

    public function spu()
    {
        return $this->hasMany('GoodsSpu', 'goods_id', 'goods_id');
    }
}